
CREATE TABLE [dbo].[UserConnections](
	[IdUser] [bigint] NOT NULL,
	[DateConnection] [datetime2](7) NOT NULL,
 CONSTRAINT [PK_UserConnections] PRIMARY KEY CLUSTERED 
(
	[IdUser] ASC,
	[DateConnection] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[UserConnections]  WITH CHECK ADD  CONSTRAINT [FK_UserConnections_Users] FOREIGN KEY([IdUser])
REFERENCES [dbo].[Users] ([IdUser])
GO

ALTER TABLE [dbo].[UserConnections] CHECK CONSTRAINT [FK_UserConnections_Users]
GO

